package tpo.wmb.consumer.fallback;

import com.github.pagehelper.PageInfo;
import dto.Dto;
import dto.ShowWares;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import pojo.*;
import tpo.wmb.consumer.client.Order_FeignClient;
import tpo.wmb.consumer.client.User_FeignClient;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 公共熔断
 */
@Component
@RequestMapping("/all")
public class CommonFuse implements Order_FeignClient, User_FeignClient {

    @Override
    public Dto<PageInfo<BuyOrder>> selectOrderList(Map<String, Object> map) {
        Dto dto = new Dto();
        dto.setSuccess(false);
        dto.setCode(404);
        dto.setMsg("熔断404");
        PageInfo pageInfo = new PageInfo();
        pageInfo.setPageNum(1);
        dto.setObj(pageInfo);
        System.out.println("进入了熔断");
        return dto;
    }

    @Override
    public List<BuyOrder> selectOrderList2(Integer integer) {
        return null;
    }

    @Override
    public Dto<BuyOrder> selectOrder(Integer integer) {
        Dto dto = new Dto();
        dto.setSuccess(false);
        dto.setCode(404);
        dto.setMsg("熔断404");
        return dto;
    }

    @Override
    public BuyOrder selectOrdeCoder(String s) {
        return null;
    }

    @Override
    public Integer updateOrder(BuyOrder buyOrder) {
        return -404;
    }

    @Override
    public Integer updateOrder2(BuyOrder buyOrder) {
        return null;
    }

    @Override
    public Integer updateOrder3(String s, BigDecimal bigDecimal) {
        return null;
    }

    @Override
    public Integer updateOrderState(Integer integer, Integer integer1, Integer integer2) {
        return null;
    }

    @Override
    public Integer insertOrder(BuyOrder buyOrder) {
        return -404;
    }


    @Override
    public Integer deleteOrder(Integer integer) {
        return -404;
    }

    @Override
    public Integer deleteOrder2(String s) {
        return null;
    }

    @Override
    public Dto<PageInfo<BuyReturn>> selectBuyReturnList(Map<String, Object> map) {
        Dto dto = new Dto();
        dto.setSuccess(false);
        dto.setCode(404);
        dto.setMsg("熔断404");
        PageInfo pageInfo = new PageInfo();
        pageInfo.setPageNum(1);
        dto.setObj(pageInfo);
        System.out.println("进入了熔断");
        return dto;
    }

    @Override
    public Dto<BuyReturn> selectBuyReturn(Integer integer) {
        Dto dto = new Dto();
        dto.setSuccess(false);
        dto.setCode(404);
        dto.setMsg("熔断404");
        return dto;
    }

    @Override
    public BuyReturn selectBuyReturn2(String s) {
        return null;
    }

    @Override
    public Integer updateBuyReturn(BuyReturn buyReturn) {
        return -404;
    }

    @Override
    public Integer updateBuyReturn2(String s, BigDecimal bigDecimal) {
        return null;
    }

    @Override
    public Integer updateBuyReturnState(Integer integer, Integer integer1, Integer integer2) {
        return null;
    }

    @Override
    public Integer insertBuyReturn(BuyReturn buyReturn) {
        return -404;
    }

    @Override
    public Integer deleteBuyReturn(Integer integer) {
        return -404;
    }

    @Override
    public List<ShowWares> selectDetailList(String s, Integer integer) {
        return null;
    }

    @Override
    public List<ShowWares> selectDetailList2(String s, Integer integer) {
        return null;
    }

    @Override
    public Integer insertDetailList(DetailList detailList) {
        return null;
    }

    @Override
    public Integer updateDetailList(DetailList detailList) {
        return null;
    }

    @Override
    public Integer deleteDetailList(Integer integer) {
        return null;
    }

    @Override
    public Map<String, Object> seeUpdateBuyReturn(Integer integer) {
        return null;
    }

    @Override
    public Map<String, Object> detailListWares(String s) {
        return null;
    }

    @Override
    public User orderUser(Integer integer) {
        return null;
    }

    @Override
    public Integer updateDetailList2(List<DetailList> list) {
        return null;
    }


    @Override
    public PageInfo<User> selectUserList(Map<String, Object> map) {
        return null;
    }

    @Override
    public List<Integer> selectUserListInt(String s) {
        return null;
    }

    @Override
    public List<User> selectUsers() {
        return null;
    }

    @Override
    public User selectUser(Integer integer) {
        return null;
    }

    @Override
    public Integer insertUser(User user) {
        return null;
    }

    @Override
    public Integer updateUser(User user) {
        return null;
    }

    @Override
    public Integer deleteUser(Integer integer) {
        return null;
    }

    @Override
    public List<Useraddress> selectAddressList(Integer integer) {
        return null;
    }


    @Override
    public Useraddress selectAddress(Integer integer) {
        return null;
    }

    @Override
    public Integer insertAddress(Useraddress useraddress) {
        return null;
    }

    @Override
    public Integer updateAddress(Useraddress useraddress) {
        return null;
    }

    @Override
    public Integer deleteAddress(Integer integer) {
        return null;
    }

    @Override
    public Useraddress selectDefalutAddress(Integer integer) {
        return null;
    }
}
